<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加内容</title>
	<hdjs />
	<script type="text/javascript">
		$(function(){
			$('form').validate({
				{$validate}	
			})
		})
	</script>

	<js file='__PUBLIC__/Js/mod.article.js' />
	<css file="__PUBLIC__/Css/mod.welcome.css" />
	<css file="__PUBLIC__/Css/mod.base.css" />
</head>
<body>

	<form action="" method="post" enctype='multipart/form-data'>

		<div class="hd-title-header">
			<span>{$cname}</span>
			添加内容
		</div>
		<div class="hd-menu-list">
			<ul>
				<if condition="$catType neq 4">
					<li>
						<a href="{:U('Article/index',array('cid'=>
							$_GET["cid"]))}" >
							内容列表
						</a>
					</li>
				</if>
				<li class="active">
					<a href="javascript:;" >添加内容</a>
				</li>
			</ul>
		</div>

		<div class="hd-tab">
			<ul class="hd-tab-menu">
				<li lab='base' class='active'>
					<a href="#">基本配置</a>
				</li>
				<li lab='pic'>
					<a href="#">图集上传</a>
				</li>
			</ul>
			<div class="hd-tab-content">
				<div lab='base' class='hd-table-area'>
					<table class='hd-table hd-table-form hd-form'>
						<tbody>

							<tr>
								<th class="hd-w100">栏目分类</th>
								<td>
									<if condition="$catType neq 4">
										<select name="category_cid" >
											<option value="0">请选择分类</option>
											<option value="{$topid}" <if condition="$topid eq $_GET['cid']">selected='selected'</if>
											>{$topname}
										</option>
										<foreach name='category' item='v'>
											<option <if condition="$v['cid'] eq $_GET['cid']">selected='selected'</if>
											{$v.disabled} value="{$v.cid}">---{$v._html}{$v.cname}
										</option>
									</foreach>
								</select>
								<else/>
								{$cname}
								<input type="hidden" name="category_cid" value="{$cid}" />
							</if>
						</td>
					</tr>

					<tr>
						<th class="hd-w100">标题</th>
						<td>
							<input type="text" name="article_title"  class='hd-w350 title'/>
						</td>
					</tr>

					<tr>
						<th>关键字</th>
						<td>
							<textarea name="keywords" class='hd-w500 hd-h100'></textarea>
						</td>
					</tr>

					<tr>
						<th>描述</th>
						<td>
							<textarea name="description" class='hd-w500 hd-h100'></textarea>
						</td>
					</tr>

					<tr>
						<th>排序</th>
						<td>
							<input name="sort" type="text" class='hd-w200' value="100" />
						</td>
					</tr>
					<tr>
						<th>次数</th>
						<td>
							<input name="click" type="text" class='hd-w200' value="100" />
						</td>
					</tr>
					<tr>
						<th>发布时间</th>
						<td>
							<input name="addtime" id='addtime' type="text" class='hd-w200' />
							<script>
								$('#addtime').calendar({
									format : 'yyyy-MM-dd'
								});
							</script>
						</td>
					</tr>
					<tr>
						<th>审核</th>
						<td>
							<label >
								<input name="verifystate" type="radio"  value="1" />
								审核中
							</label>
							<label >
								<input checked="checked" name="verifystate" type="radio" value="2" />
								通过
							</label>
						</td>
					</tr>
					<tr>
						<th>属性</th>
						<td>
							<foreach name='flag' item='v'>
								<label >
									<input name="flag[]" type="checkbox"  value="{$v}" />
									{$v}({$key})
								</label>
							</foreach>
						</td>
					</tr>
					<tr>
						<th>图片</th>
						<td>
							<input type="file" name='pic'/>
						</td>
					</tr>
					<tr >
						<th>文件</th>
						<td>
							<input type="file" name='file'/>
						</td>
					</tr>

					<foreach name='extForm' item='v'>
						<tr>
							<th>{$v.title}</th>
							<td>{$v.html}</td>
						</tr>
					</foreach>
					<if condition="$attrForm">
						<tr>
							<th align='left' colspan='2'>筛选</th>
						</tr>
						<foreach name='attrForm' item='v'>
							<tr>
								<th>{$v.title}</th>
								<td>{$v.html}</td>
							</tr>
						</foreach>
					</if>
				</tbody>
			</table>
		</div>
		<div lab='pic' class="hd-tab-area" id='pic'>
			<if condition='!$attrPicCount'>
				<table class='hd-table hd-table-form hd-form'>
					<tbody>
						<tr>
							<th width="20">
								<span class='hand' onclick='add_pic(this)'>[+]</span>
							</th>
							<td >
								<input type="file" name="img[]" class="input noborder" />
							</td>
							<td style='display:none'>
								<input type="text" name="pic_title[]" class="input" />
							</td>
						</tr>

					</tbody>
				</table>
				<else />
				<div class="color">

					<!-- <ul class="color_menu">
					<li lab='attr1' >
						<a href="#" >红色</a>
					</li>
					<li lab='attr2'>
						<a href="#">黄色</a>
					</li>
				</ul>

				<div class="color_content">

					<div id='attr1'>
						<table class='table2 hd-form'>
							<tr>
								<td width="20">
									<span class='hand' onclick='add_pic(this)'>[+]</span>
								</td>
								<td width="50">
									<input type="file" name="img1[]" class="input noborder" />
								</td>
								<td >
									<input type="text" name="pic_title1[]" class="input" />
								</td>
							</tr>
						</table>
					</div>

					<div id='attr2'>
						<table class='table2 hd-form'>
							<tr>
								<td width="20">
									<span class='hand' onclick='add_pic(this)'>[+]</span>
								</td>
								<td width="50">
									<input type="file" name="img2[]" class="input noborder" />
								</td>
								<td >
									<input type="text" name="pic_title2[]]" class="input" />
								</td>

							</tr>
						</table>
					</div>
				</div>
				-->
			</div>

		</if>
	</div>
</div>
</div>

<div class="hd-position-bottom">
<input type="submit" class='hd-btn-primary hd-btn' value="添加" />
<input type="button" class="hd-btn" onclick="location.href='{:U('Article/index',array('cid'=>$_GET['cid']))}'" value="返回"/></div>

</form>

</body>
</html>